package nosql.property;

import java.util.HashSet;
import java.util.Set;


/**
 * Contains a set of properties, the properties may contain 
 * properties extracted from property tables according to the 
 * requirement of query, or it may contain properties parsed 
 * by input JSON document.
 * @author Yexi Jiang <http://sites.google.com/site/yexijiang/>
 *
 */
public class PropertySet extends HashSet<Property>{
	
	private Set<String> propertyNameSet;
	
	public PropertySet(){
		super();
		propertyNameSet = new HashSet<String>();
	}
	
	public boolean add(Property property){
		propertyNameSet.add(property.getTableName());
		return super.add(property);
	}
	
	public Set<String> getPropertyNameSet(){
		return propertyNameSet;
	}

}
